import { axios } from '@/utils/http/request'
// import { makeFormData } from '@/utils/util'

export const biologyApi = {
  list: '/bosg/list',
  info: '/bosg/info/',
  add: '/bosg/addModel',
  delete: '/bosg/deletePerson/',
  modelList: '/bosg/modelList',
  modelUpdate: '/bosg/updateModel',
  modelDelete: '/bosg/deleteModel'
}

export const imgReqApi = {
  list: '/scen/capimg/list'
}

export const videoApi = {
  volaList: '/scen/volavideo/list',
  volaSave: '/scen/volavideo/save',
  lawList: '/scen/lawvideo/list',
  lawInfo: '/scen/lawvideo/info/',
  lawSave: '/scen/lawvideo/save',
  lawDelete: '/scen/lawvideo/delete/'
}

// 获取生物特征库列表
export function biologyList (headers, params) {
  return axios({
    url: biologyApi.list,
    method: 'post',
    headers,
    params
  })
}

// 获取图像资源库列表
export function imgReqList (headers, params) {
  return axios({
    url: imgReqApi.list,
    method: 'post',
    headers,
    params
  })
}

// 违规视频库列表
export function volaVideoList (headers, params) {
  return axios({
    url: videoApi.volaList,
    method: 'post',
    headers,
    params
  })
}

// 执法视频库列表
export function lawVideoList (headers, params) {
  return axios({
    url: videoApi.lawList,
    method: 'post',
    headers,
    params
  })
}

// 获取生物特征库详情
export function biologyInfo (psnNo) {
  return axios({
    url: biologyApi.info + psnNo,
    method: 'get'
  })
}

// 增加生物特征库人员
export function biologyAdd (params) {
  return axios({
    url: biologyApi.add,
    method: 'post',
    params
  })
}

// 生物特征删除
export function biologyDelete (psnNo) {
  return axios({
    url: biologyApi.delete + psnNo,
    method: 'get'
  })
}

// 获取人员模板列表
export function modelListByUser (headers, params) {
  return axios({
    url: biologyApi.modelList,
    method: 'post',
    headers,
    params
  })
}

// 人员模板删除
export function modelDelByUser (params) {
  return axios({
    url: biologyApi.modelDelete,
    method: 'post',
    params
  })
}

// 修改人员模板状态
export function modelUpdateByUser (params) {
  return axios({
    url: biologyApi.modelUpdate,
    method: 'post',
    params
  })
}

export function lawVideoSave (params) {
  return axios({
    url: videoApi.lawSave,
    method: 'post',
    params
  })
}

export function lawVideoInfo (lawVideoId) {
  return axios({
    url: videoApi.lawInfo + lawVideoId,
    method: 'get'
  })
}

export function lawVideoDelete (lawVideoId) {
  return axios({
    url: videoApi.lawDelete + lawVideoId,
    method: 'get'
  })
}

export function volaVideoSave (params) {
  return axios({
    url: videoApi.volaSave,
    method: 'post',
    params
  })
}

// 获取用户列表
// export function getPersonList (data) {
//   let form_Data = new FormData()
//   makeFormData(data,form_Data)
//   return axios({
//     url: 'medical/person/list.jspx',
//     method: 'post',
//     data: form_Data
//   })
// }

// TXT模本文件下载
// export function txtDownLoad () {
//   return axios({
//     url: api_address.personDown,
//     method: 'GET',
//     responseType: 'blob'
//   })
// }
